<!--
To change this template, choose Tools | Templates
and open the template in the editor.
-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>

    <body>
        Welcome <?php echo $_GET["name"]; ?>.<br/>
        Your key is <?php echo $_GET["key"]; ?>.<br/>

        <?php
        $con = mysql_connect("localhost:3306", "root");
        if (!$con) {
            die('Could not connect: ' . mysql_error());
        }
        if (mysql_query("CREATE DATABASE my_db", $con)) {
            echo "Database created";
        } else {
            echo "Error creating database: " . mysql_error();
        }
        mysql_select_db("my_db", $con);
        $sql = "CREATE TABLE person
                (
                FirstName varchar(15),
                LastName varchar(15),
                Age int
                )";
        mysql_query($sql, $con);
        mysql_close($con);
        ?>
    </body>
</html>
